<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>平台打款管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/static/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/layuiadmin/style/admin.css" media="all">
    <style>
        #guide_ul li{
            margin-top: 5px;
        }
    </style>
</head>
<body>
<div id="aaa"></div>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">打款信息</div> 
                <div class="layui-card-body">
                    <div class="layui-form-item layui-form">
                       <!--  <div class="layui-inline">
                            <label class="layui-form-label">订单编号</label>
                            <div class="layui-input-block">
                                <input type="text" name="order_sn_"  id="order_sn_"  placeholder="请输入" autocomplete="off" class="layui-input">
                            </div>
                        </div>  -->
						
                        <input name="" type="hidden" value="{$data.id}" id="object_id" >
					            	<input name="" type="hidden" value="{$data.type}" id="object_type"> 
                        <div class="layui-inline">
                            <div class="layui-btn-group test-table-operate-btn">
                               
                            </div>
                        </div>
                         
                           <div class="layui-inline">
                            <div class="layui-btn-group test-table-operate-btn">
                               
                            </div>
                        </div>
                    </div>

                    <table class="layui-hide"  lay-filter="test-table-operates">
                       <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBriefa">
                          <ul class="layui-tab-title">
                            <li class="layui-this">店铺信息</li> 
                          </ul>
                          <div class="layui-tab-content" >
                              <div class="layui-tab-item layui-show">

                                  <div class="layui-form-item">
                                    <label class="layui-form-label">店铺名称:</label>
                                    <div class="layui-input-block">
                                      <input type="text" name="title" lay-verify="title" autocomplete="off"  value="{$shopInfo.shop_name}" class="layui-input">
                                    </div>
                                  </div>
                                  <div class="layui-form-item">
                                    <label class="layui-form-label">银行卡号:</label>
                                    <div class="layui-input-block">
                                      <input type="text" name="username" lay-verify="required" value="{$shopInfo.bank_card}"   autocomplete="off" class="layui-input">
                                    </div>
                                  </div>
                                  <div class="layui-form-item">
                                    <label class="layui-form-label">开户行:</label>
                                    <div class="layui-input-block">
                                      <input type="text" name="title" lay-verify="title" autocomplete="off" value="{$shopInfo.bank_name}" class="layui-input">
                                    </div>
                                  </div>
                                    <div class="layui-form-item">
                                    <label class="layui-form-label">持卡人姓名:</label>
                                    <div class="layui-input-block">
                                      <input type="text" name="title" lay-verify="title" autocomplete="off" value="{$shopInfo.bank_user_name}" class="layui-input">
                                    </div>
                                  </div>

                            </div>  
                           </div>
                          </div> 
                          <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBriefa">
                          <ul class="layui-tab-title">
                            <li class="layui-this">结算信息</li> 
                          </ul>
                          <div class="layui-tab-content"  >
                              <div class="layui-tab-item layui-show">
                                  <div class="layui-form-item">
                                    <label class="layui-form-label">订单金额:</label>
                                    <div class="layui-input-block">
                                      <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入标题" value="{$settleInfo.settlement_money}" class="layui-input">
                                    </div>
                                  </div>
                                  <div class="layui-form-item">
                                    <label class="layui-form-label">平台抽成:</label>
                                    <div class="layui-input-block">
                                      <input type="text" name="username" lay-verify="required"  value="{$settleInfo.commission_fee}"placeholder="请输入" autocomplete="off" class="layui-input">
                                    </div>
                                  </div>
                                  <div class="layui-form-item">
                                    <label class="layui-form-label">结算类型:</label>
                                    <div class="layui-input-block">
                                      <input type="text" name="title" lay-verify="title" autocomplete="off"  value="{$settleInfo.settlement_type}" class="layui-input">
                                    </div>
                                  </div>
                                    <div class="layui-form-item">
                                    <label class="layui-form-label">应结算金额:</label>
                                    <div class="layui-input-block">
                                      <input type="text" name="title" lay-verify="title" autocomplete="off" value="{$settleInfo.back_money}" class="layui-input">
                                    </div>
                                  </div>
                              </div>  
                            </div>
                           </div> 
                            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBriefa">
                          <ul class="layui-tab-title">
                            <li class="layui-this">订单信息</li>  
                               <button class="layui-btn" onclick="window.location.href='{$settleInfo.settlement_form}'"> 
                                导出
                             </button> 
                          </ul>
                          <div class="layui-tab-content" id="test-table-operate" >  
                            </div>
                             <ul class="layui-tab-title">
                            <li class="layui-this">操作信息</li>   
                          </ul>
                           <div class="layui-tab-content"  >
                            <div class="layui-form-item">
                                    <label class="layui-form-label">操作人员:</label>
                                    <div class="layui-input-block">
                                      <input type="text" name="title" lay-verify="title" autocomplete="off"  value="{$settleInfo.admin_relname}" class="layui-input">
                                    </div>
                                  </div>
                                   <div class="layui-form-item">
                                    <label class="layui-form-label">打款回执单:</label>
                                   <div  class="layui-input-block" id="upload_thumb_img_div1" style=" ;"> 
                                      <div class="layui-upload-list">
                                          <img class="layui-upload-img" id="upload_thumb_img1" style="width:200px;height:140px;" src="{$settleInfo.receipt}">
                                      </div>
                                  </div>
                                </div>
                                </div>
                            <div style="text-align: center;">
                              <br/>
                             <button class="layui-btn" onclick="javascript:location.href='/admin/settlements/ispayment.html'">
                                     返回
                                </button>
                            </div>
                           </div>   
                  </table> 
                </div>
            </div>
        </div>
    </div>
</div>

<div id="contentShow" style="display:none;padding: 30px;">
    <p id="consultation"></p>
</div>  
<script src="/static/layuiadmin/layui/layui.js"></script>  
<script>
layui.use('laydate', function(){
  var laydate = layui.laydate;  
  //日期范围
  laydate.render({
    elem: '#test6'
    ,range: true
  }); 
});  

    var type=document.getElementById('object_type').value;
	var id=document.getElementById('object_id').value 
    layui.config({
        base: '/static/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','form','table','laydate','set'], function(){
        $ = layui.jquery;
        var table = layui.table
            ,admin = layui.admin
            ,element = layui.element
            ,layer = layui.layer
            ,laydate = layui.laydate
            ,form = layui.form; 
       table.render({ 
             elem: '#test-table-operate'
            ,id: 'queryList'
            ,url: "{:url('Settlements/shoppaymentinfo')}?id="+id+"&type="+type 
             
            ,cols: [[  
                 {field:'order_id',width:80,align:'center', title: '订单ID'} 
                ,{field:'order_sn',align:'center',title: '订单编号'}
                ,{field:'pay_type',align:'center',title: '支付方式'} 
                ,{field:'order_price', align:'center', title: '商品金额'}
                ,{field:'order_price', align:'center', title: '订单总额'}
                ,{field:'commission_fee', align:'center', title: '佣金'}
                ,{field:'create_time', align:'center', title: '下单时间'}  
            ]]
            ,page:true
            ,limit:10 
			
        });  
        form.render(null,'component-form-group');

        laydate.render({
            elem: '#search_time'
        }); 
        var $ = layui.$, active = {
            addadmin: function() {
                window.location.href="{:url('Merchant/guideAdd')}";
            },
            exportButton:function(){ 
                var order_sn = $('#order_sn_').val();
                var create_time = $('#test6').val();  
                table.reload('queryList', {
                    where: {
                        order_sn:order_sn,
                        create_time: create_time 
                    }
                    ,page: {
                        curr: 1 //重新从第 1 页开始
                    }
                });
                //return false;
            }, 

        };
        //绑定点击事件
        $('.test-table-operate-btn .layui-btn').on('click', function(){
            var type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });

    });

</script>


</body>
</html>